home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / gt_power / gtuser11.zip / GTUSER.DOC next >
Text File  |  1991-02-06  |  5KB  |  109 lines

  1. Documentation for GTUSER    version 1.1    06/02/91
  2. Copyright (C) 1990-91 Ted Harper
  3.  
  4.  
  5. Free distribution and use of _unmodified_ source and executable
  6. code expressly permitted.
  7.  
  8. GTUSER.PAS is a Turbo Pascal "unit" which accesses and parses the contents
  9. of the GTUSER.BBS file set up by the GT-PowerComm communications program to
  10. give "door" or "companion" programs information about the current user. Using
  11. this unit in any programs you are writing will save "reinventing the wheel"
  12. by writing code to determine user level, name, authorisations, etc.
  13.  
  14. It is very simple to use the unit in any door program; the following code is
  15. a trivial example of all that is required to get the current user's
  16. parameters and use them :
  17.  
  18. program Simple_Demo;
  19. uses
  20.    GTUSER;
  21. var
  22.    User_Details : GTUSER_BBS_Details;
  23. begin
  24.    GetGTUSERDetails(User_Details);
  25.    writeln('User Name : ',User_Details.First_Name,' ',User_Details.Last_Name);
  26.    ...
  27. end.
  28.  
  29. The structure which is returned by the GTUSER unit contains the following
  30. fields :-
  31.  
  32. User Level     : Single letter code (0..z)
  33. First Name,
  34. Last Name      : Two variable-length strings
  35. Authorisations : a Pascal "set" containing all assigned privileges for user
  36. DCE BPS Rate   : The user's connect rate (or 0 for local testing)
  37. DTE BPS Rate   : Modem-CPU communications rate
  38. ANSI           : A boolean flag giving user preference
  39. Last Date      : When user was last on (separate day, month and year fields)
  40. Limit          : minutes remaining this call
  41. Event          : Time in minutes to next scheduled event
  42. Current time   : When the GTUSER.BBS file was created
  43.  
  44. A sample application of the GTUSER unit is provided in this archive. The
  45. program GTUSERTS simply extracts the contents of the GTUSER.BBS and displays
  46. them on the screen in an annotated, readable form.
  47.  
  48. This demonstration program may be useful to sysops running GT under DESQview.
  49. Normally, when a user is running a doorway program (or an external comms
  50. protocol such as DSZ), the GT status line is unavailable and they can't tell
  51. who is currently on the system without starting a DOS task and viewing
  52. GTUSER.BBS or the log file.
  53.  
  54. If GTUSERTS is set up as a DV window (use Add Program with supplied .DVP file
  55. and change "program directory" accordingly), it can be run at any time by
  56. the sysop (requires only 32k) in 4 keystrokes ("DESQ" "O" "GU" for example).
  57. When ENTER is pressed, the screen is refreshed with possibly new user details
  58. (as the program does _not_ automatically re-read the file periodically, to
  59. avoid any file sharing problems with GT. If you enter "Q" and press ENTER,
  60. the program terminates and closes its window.
  61.  
  62. The GTUSER will always obtain the GTUSER.BBS file via the GTPATH environment
  63. variable. If you are running a multi-node system under DV and want to see
  64. each separate user, you could create separate tasks for each session you
  65. want to watch, and set a GTPATH in each prior to invoking GTUSERTS (in a
  66. BAT file obviously!).
  67.  
  68. This multi-node "quirk" only applies to "supervisor" programs running in
  69. a separate DV partition on multi-line GT host systems. Normal door programs
  70. each only see their own private "world" and for them, the GTPATH will always
  71. be correct.
  72.  
  73. All the source code to GTUSER and GTUSERTS is provided. Everything is written
  74. in Turbo Pascal (5.5) and I feel it is fairly self-explanatory. I will be
  75. progressively improving the operation and facilities of GTUSER, and will also
  76. release various little "helpful" programs which make use of it as time permits.
  77.  
  78. Because I wish to retain ownership and control of these programs, you are
  79. _not_ permitted to recompile or modify any of the supplied source code except
  80. for your own use. That is, you may not redistribute, sell, or otherwise spread
  81. around versions of my code which you have changed. Of course, you are free to
  82. do what you wish with any of your own code which calls my routines, but mine
  83. are _only_ to be used for further distribution in their "pristine"<grin>
  84. state.
  85.  
  86. If you have any suggestions for improving the operation of GTUSER, or find a
  87. <wince shudder> bug, drop me a message at either of the bulletin
  88. boards below :-
  89.  
  90.        The Big Apple                        The Poet's Dilemma
  91.        Sydney, Australia                    Sydney, Australia
  92.        GTNet 302/021                        GTNet 302/000
  93.        Phone +61 2 764-3410 (24 hrs)        Phone +61 2 804-6412  (24 hrs)
  94.  
  95.  
  96. ted harper
  97. 06/02/91
  98.  
  99.  
  100. Release History
  101. ---------------
  102. 0.8   11/11/90    Initial "alpha" release.
  103. 0.9   13/11/90    Corrections for latest GT host mode, where DCE and DTE
  104.                   rates are returned; minor tidyups to GTUSERTS.
  105. 1.0   18/11/90    Swapped DCE and DTE values (I guessed wrong - thanks JD-T);
  106.                   added multi-node DV info to docs; initial public release.
  107. 1.1   06/02/91    Correctly handle multiple blanks within GTUSER.BBS line;
  108.                   Don't use FSearch routine because of undocumented feature.
  109.